#include <iostream>
#include <algorithm>
#include <cstdio>
#include <array>
#define int long long
using namespace std;
#ifdef ONLINE_JUDGE

/* #define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++) */
/* char buf[1 << 23], *p1 = buf, *p2 = buf, ubuf[1 << 23], *u = ubuf; */

#endif
int read() {
    int p = 0, flg = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-') flg = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        p = p * 10 + c - '0';
        c = getchar();
    }
    return p * flg;
}
void write(int x) {
    if (x < 0) {
        x = -x;
        putchar('-');
    }
    if (x > 9) {
        write(x / 10);
    }
    putchar(x % 10 + '0');
}
bool _stmer;

const int N = 1e5 + 5, K = 1005, M = 34, mod = 1e9 + 7;

char strbuf[N];

array <array <array <int, M>, M>, K> f;

void Mod(int &x) {
    if (x >= mod) x -= mod;
    if (x < 0) x += mod;
}

int pow_(int x, int k, int p) {
    int ans = 1;
    while (k) {
        if (k & 1) ans = ans * x % p;
        x = x * x % p;
        k >>= 1;
    }
    return ans;
}

bool _edmer;
signed main() {
    cerr << (&_stmer - &_edmer) / 1024.0 / 1024.0 << "MB\n";
#ifndef cxqghzj
    freopen("pearl.in", "r", stdin);
    freopen("pearl.out", "w", stdout);
#endif
    int n = read(), m = read(), sX = read();
    scanf("%s", strbuf);
    string s = strbuf; s = " " + s;
    int sY = 0;
    for (int i = 1; i <= m; i++)
        sY += (s[i] == '1') * (1 << (i - 1));
    if (n == 1) {
        puts("0");
        return 0;
    }
    if (m == 1 && sX == 1 && sY == 0) {
        if (n == 2) return puts("0"), 0;
        write(pow_(2, n / 2 - 1, mod) * (pow_(2, (n - 1) / 2, mod) - 1 + mod) % mod), puts("");
        return 0;
    }
    f[0][0][0] = 1;
#define upd(x, y) (x += y, Mod(x))
    for (int i = 1; i <= n; i++) {
        for (int T = 0; T < 1 << m; T++) {
            for (int S = 0; S < 1 << m; S++) {
                if (i == sX) {
                    upd(f[i][T ^ (S * sY % (1 << m))][sY], f[i - 1][T][S]);
                    continue;
                }
                for (int j = 0; j < 1 << m; j++)
                    upd(f[i][T ^ (S * j % (1 << m))][j], f[i - 1][T][S]);
            }
        }
    }
    /* cerr << f[1][0][2] << "@" << endl; */
    int ans = 0;
    for (int T = 0; T < 1 << m; T++)
        for (int S = 0; S < 1 << m; S++)
            upd(ans, f[n][T][S] * T % mod);
    write(ans), puts("");
    return 0;
}
